#ifndef DATABASEDOWNLOADER_H
#define DATABASEDOWNLOADER_H

#include <QObject>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QNetworkAccessManager>
#include <QFile>

class DatabaseDownloader : public QObject
{
    Q_OBJECT
public:
    explicit DatabaseDownloader(QObject *parent = nullptr);
    ~DatabaseDownloader();

    void ask(QUrl url, QString filePath);
    void ask(QString url, QString filePath);

private:
    QNetworkAccessManager* accessManger;
    QString filePath;

signals:
    void finished(bool);

private slots:
    void requestFinished(QNetworkReply* reply);

};

#endif // DATABASEDOWNLOADER_H
